<?php

namespace Syrius\Type;

/**
 * Enter description here ...
 * @package	Type
 * @author	Domenico Biancardi <domenico.biancardi@gmail.com>
 * @link	http://code.google.com/p/syrius/
 *
 */ class Blob extends String {
	/**
	 * Generazione della rappresentazione sql
	 */
	public function __toString() {
		$str = $this->type;
		// column definition
		if ($this->auto_increment) {
			$str .= " AUTO_INCREMENT";
		}
		if ($this->null) {
			$str .= " NULL";
		} else {
			$str .= " NOT NULL";
		}
		if ($this->default) {
			$str .= " DEFAULT " . $this->default;
		}
		if ($this->comment) {
			$str .= " COMMENT '" . $this->comment . "'";
		}
		if ($this->column_format) {
			$str .= " COLUMN_FORMAT " . $this->column_format;
		}
		if ($this->storage) {
			$str .= " STORAGE " . $this->storage;
		}

		// index
		if ($this->primary) {
		}
		if ($this->index) {
			$index = new Syrius_Keys_Index ("test");
			$str .= ", INDEX " . $index;
		}
		if ($this->unique) {
		}
		if ($this->fulltext) {
		}
		/*if ($this -> relation){
}*/

		return $str;
	}


}

?>
